<?php
/*
 * @ https://EasyToYou.eu - IonCube v11 Decoder Online
 * @ PHP 7.2 & 7.3
 * @ Decoder version: 1.1.6
 * @ Release: 10/08/2022
 */

// Decoded file for php version 71.
namespace Qcloud\Cos;

class TokenListener implements \Symfony\Component\EventDispatcher\EventSubscriberInterface
{
    protected $token;
    public function __construct($token)
    {
        $this->token = $token;
    }
    public static function getSubscribedEvents()
    {
        return ["request.before_send" => ["onRequestBeforeSend", -240]];
    }
    public function onRequestBeforeSend(\Guzzle\Common\Event $event)
    {
        if($this->token != NULL) {
            $event["request"]->setHeader("x-cos-security-token", $this->token);
        }
    }
}

?>